home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / text / rel-1.001 < prev    next >
Encoding:
Text File  |  1996-11-16  |  7.6 KB  |  169 lines

  1. From the README:
  2.  
  3. Rel is a program that determines the relevance of text documents to a
  4. set of keywords expressed in boolean infix notation. The list of file
  5. names that are relevant are printed to the standard output, in order
  6. of relevance.
  7.  
  8. For example, the command:
  9.  
  10.     rel "(directory & listing)" /usr/share/man/cat1
  11.  
  12. (ie., find the relevance of all files that contain both of the words
  13. "directory" and "listing" in the catman directory) will list 21 files,
  14. out of the 782 catman files, (totaling 6.8 MB,) of which "ls.1" is the
  15. fifth most relevant-meaning that to find the command that lists
  16. directories in a Unix system, the "literature search" was cut, on
  17. average, from 359 to 5 files, or a reduction of approximately 98%. The
  18. command took 55 seconds to execute on a on a System V, rel. 4.2
  19. machine, (20Mhz 386 with an 18ms. ESDI drive,) which is a considerable
  20. expediency in relation to browsing through the files in the directory
  21. since ls.1 is the 359'th file in the directory. Although this example
  22. is remedial, a similar expediency can be demonstrated in searching for
  23. documents in email repositories and text archives.
  24.  
  25. Additional applications include information robots, (ie., "mailbots,"
  26. or "infobots,") where the disposition (ie., delivery, filing, or
  27. viewing,) of text documents can be determined dynamically, based on
  28. the relevance of the document to a set of criteria, framed in boolean
  29. infix notation. Or, in other words, the program can be used to order,
  30. or rank, text documents based on a "context," specified in a general
  31. mathematical language, similar to that used in calculators.
  32.  
  33. General description of the program:
  34.  
  35. This program is an experiment to evaluate using infix boolean
  36. operations as a heuristic to determine the relevance of text files in
  37. electronic literature searches. The operators supported are, "&" for
  38. logical "and," "|" for logical "or," and "!" for logical "not."
  39. Parenthesis are used as grouping operators, and "partial key" searches
  40. are fully supported, (meaning that the words can be abbreviated.) For
  41. example, the command:
  42.  
  43.     rel "(((these & those) | (them & us)) ! we)" file1 file2 ...
  44.  
  45. would print a list of filenames that contain either the words "these"
  46. and "those", or "them" and "us", but doesn't contain the word "we"
  47. from the list of filenames, file1, file2, ... The order of the printed
  48. file names is in order of relevance, where relevance is determined by
  49. the number of incidences of the words "these", "those", "them", and
  50. "us", in each file. The general concept is to "narrow down" the number
  51. of files to be browsed when doing electronic literature searches for
  52. specific words and phrases in a group of files using a command similar
  53. to:
  54.  
  55.     more `rel "(((these & those) | (them & us)) ! we)" file1 file2`
  56.  
  57. Applicability:
  58.  
  59. Applicability of rel varies on complexity of search, size of database,
  60. speed of host environment, etc., however, as some general guidelines:
  61.  
  62.     1) For text files with a total size of less than 5 MB, rel, and
  63.     standard egrep(1) queries of the text files will probably prove
  64.     adequate.
  65.  
  66.     2) For text files with a total size of 5 MB to 50 MB, qt seems
  67.     adequate for most queries. The significant issue is that, although
  68.     the retrieval execution times are probably adequate with qt, the
  69.     database write times are not impressive. Qt is listed in "Related
  70.     information retrieval software:," below.
  71.  
  72.     3) For text files with a total size that is larger than 50 MB, or
  73.     where concurrency is an issue, it would be appropriate to consider
  74.     one of the other alternatives listed in "Related information
  75.     retrieval software:," below.
  76.  
  77. Extensibility:
  78.  
  79.     The source was written with extensibility as an issue. To alter
  80.     character transliterations, see uppercase.c for details. For
  81.     enhancements to phrase searching and hyphenation suggestions, see
  82.     translit.c.
  83.  
  84.     It is possible to "weight" the relevance determination of
  85.     documents that are composed in one of the standardized general
  86.     markup languages, like TeX/LaTeX, or SGML. The "weight" of the
  87.     relevance of search matches depends on where the words are found
  88.     in the structure of the document, for example, if the search was
  89.     for "numerical" and "methods," \chapter{Numerical Methods} would
  90.     be weighted "stronger" than if the words were found in
  91.     \section{Numerical Methods}, which in turn would be weighted
  92.     "stronger" than if the words were found in a paragraph. This would
  93.     permit relevance of a document to be determined by how author
  94.     structured the document. See eval.c for suggestions.
  95.  
  96.     The list of identifiers in the search argument can be printed to
  97.     stdio, possibly preceeded by a '+' character and separated by '|'
  98.     characters to make an egrep(1) compatible search argument, which
  99.     could, conceivably, be used as the search argument in a browser so
  100.     that something like:
  101.  
  102.        "browse `rel arg directory'"
  103.  
  104.     would automatically search the directory for arg, load the files
  105.     into the browser, and skip to the first instance of an identifier,
  106.     with one button scanning to the next instance, and so on. See
  107.     postfix.c for suggestions.
  108.  
  109.     The source architecture is very modularized to facilitate adapting
  110.     the program to different environments and applications, for
  111.     example, a "mailbot" can be constructed by eliminating
  112.     searchpath.c, and constructing a list of postfix stacks, with
  113.     perhaps an email address element added to each postfix stack, in
  114.     such a manner that the program could be used to scan incoming
  115.     mail, and if the mail was relevant to any postfix criteria, it
  116.     would be forwarded to the recipient.
  117.  
  118.     The program is capable of running as a wide area, distributed,
  119.     full text information retrieval system. A possible scenario would
  120.     be to distribute a large database in many systems that are
  121.     internetworked together, presumably via the Unix inet facility,
  122.     with each system running a copy of the program. Queries would be
  123.     submitted to the systems, and the systems would return individual
  124.     records containing the count of matches to the query, and the file
  125.     name containing the matches, perhaps with the machine name, in
  126.     such a manner that the records could be sorted on the "count
  127.     field," and a network wide "browser" could be used to view the
  128.     documents, or a script could be made to use the "r suite" to
  129.     transfer the documents into the local machine. Obviously, the
  130.     queries would be run in parallel on the machines in the
  131.     network-concurrency would not be an issue. See the function,
  132.     main(), below, for suggestions.
  133.  
  134. References:
  135.  
  136.     1) "Information Retrieval, Data Structures & Algorithms," William
  137.     B. Frakes, Ricardo Baeza-Yates, Editors, Prentice Hall, Englewood
  138.     Cliffs, New Jersey 07632, 1992, ISBN 0-13-463837-9.
  139.  
  140.     The sources for the many of the algorithms presented in 1) are
  141.     available by ftp, ftp.vt.edu:/pub/reuse/ircode.tar.Z
  142.  
  143.     2) "Text Information Retrieval Systems," Charles T. Meadow,
  144.     Academic Press, Inc, San Diego, 1992, ISBN 0-12-487410-X.
  145.  
  146.     3) "Full Text Databases," Carol Tenopir, Jung Soon Ro, Greenwood
  147.     Press, New York, 1990, ISBN 0-313-26303-5.
  148.  
  149.     4) "Text and Context, Document Processing and Storage," Susan
  150.     Jones, Springer-Verlag, New York, 1991, ISBN 0-387-19604-8.
  151.  
  152.     5) ftp think.com:/wais/wais-corporate-paper.text
  153.  
  154.     6) ftp cs.toronto.edu:/pub/lq-text.README.1.10
  155.  
  156. Related information retrieval software:
  157.  
  158.     1) Wais, available by ftp, think.com:/wais/wais-8-b5.1.tar.Z.
  159.  
  160.     2) Lq-text, available by ftp,
  161.     cs.toronto.edu:/pub/lq-text1.10.tar.Z.
  162.  
  163.     3) Qt, available by ftp,
  164.     ftp.uu.net:/usenet/comp.sources/unix/volume27.
  165.  
  166. john@johncon.com (John Conover)
  167. Campbell, California, USA
  168. September, 1995
  169.